<div class="row">

  <div class="col-sm-1" style="margin-top: 1em">
    <a ui-sref="project.show.discussion({projectId: currentProjectId})" class="btn btn-default"><i class="fa fa-reply"></i> 返回</a>
  </div>

  <div class="col-sm-9">
    <h3>{{ currentDiscussion.baseInfo.title }}</h3>
  </div>

  <div class="col-sm-1" style="margin-top: 0.8em">
    <div ng-show="currentDiscussion.baseInfo.open" class="discussion-status discussion-status-open" >开启的</div>
    <div ng-hide="currentDiscussion.baseInfo.open" class="discussion-status discussion-status-close">已关闭</div>
  </div>
</div>
<hr />


<div class="container">

  <div class="row">

    <div class="col-sm-1">
      <img class="project-discussion-info-user-head img-circle"
           ng-src="img/userHeadImage/{{currentDiscussion.creater.head_image}}"
           alt="{{currentDiscussion.creater.username}}"
           title="{{currentDiscussion.creater.username}}"/>
    </div>

    <div class="col-sm-11">

      <div class="panel panel-default">

        <div class="panel-heading">
          此讨论由 @{{currentDiscussion.creater.username}} 创建于 {{currentDiscussion.baseInfo.created_at}}
        </div>

        <div class="panel-body">
          <markdown-previewer bind-content="currentDiscussion.baseInfo.content" ></markdown-previewer>
        </div>

        <div class="panel-footer" ng-show="currentDiscussion.followers.length">

          请求：

          <img class="img-circle project-discussion-info-sm-user-head"
               ng-repeat="follower in currentDiscussion.followers"
               ng-src="img/userHeadImage/{{follower.head_image}}"
               alt="{{follower.username}}"
               title="{{follower.username}}"/>

          关注此讨论
        </div>
      </div>

    </div>

  </div>

  <div class="row">
    <div class="col-sm-offset-2 col-sm-3">
      <button class="btn btn-danger btn-block" ng-show="currentDiscussion.baseInfo.open" ng-click="toggleOpenStatus()">关闭此讨论</button>
      <button class="btn btn-danger btn-block" ng-hide="currentDiscussion.baseInfo.open" ng-click="toggleOpenStatus()">重新开启讨论</button>
    </div>

    <div class="col-sm-offset-1 col-sm-3">
      <button class="btn btn-success btn-block" ng-show="currentDiscussion.baseInfo.open" ng-click="addComment()">参与此讨论</button>
      <span class="btn btn-warning btn-block disabled" ng-hide="currentDiscussion.baseInfo.open">已关闭的讨论无法参与</span>
    </div>
  </div>

  <hr />

  <div class="row" ng-repeat="currentComment in commentList">
    <div class="col-sm-1">
      <img class="project-discussion-info-user-head img-circle"
           ng-src="img/userHeadImage/{{currentComment.creater.head_image}}"
           alt="{{currentComment.creater.username}}"
           title="{{currentComment.creater.username}}"/>
    </div>

    <div class="col-sm-11">
      <div class="panel panel-default">

        <div class="panel-heading">
          此评论由 @{{currentComment.creater.username}} 创建于 {{currentComment.created_at}}
        </div>

        <div class="panel-body">
          <markdown-previewer bind-content="currentComment.content" ></markdown-previewer>
        </div>
      </div>

    </div>
  </div>

  <div class="text-center" ng-show="pagination.getShowLoading()">
    <img  ng-src="image/loading.gif" alt="loading"/>
  </div>

  <div class="text-center" ng-show="pagination.getFinishLoading()">
    已经没有更多的评论

  </div>


</div>